package com.tulele.vtool.mapper;

import com.tulele.vtool.model.UserPromotionSettleInfo;
import com.tulele.vtool.model.combinedEntity.CombinedIncomeRankingList;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component(value = "userPromotionSettleInfoMapper")
public interface UserPromotionSettleInfoMapper {

    /**
     * 添加推广结算信息
     * @param userPromotionSettleInfo
     * @return
     */
    int addPromotionSettleInfo(UserPromotionSettleInfo userPromotionSettleInfo);

    /**
     * 更新推广结算信息
     * @param userPromotionSettleInfo
     * @return
     */
    int updPromotionSettleInfo(UserPromotionSettleInfo userPromotionSettleInfo);

    /**
     * 查询用户推广结算信息
     * @param userId
     * @return
     */
    UserPromotionSettleInfo queryUserPromotionSettleInfo(@Param("userId") Integer userId);

    /**
     * 获取收益排行榜
     * @param gzhCode 公众号标识
     * @return 收益排行榜
     */
    List<CombinedIncomeRankingList> getIncomeRankingList(String gzhCode);
}